Global Index
HTML5 JS API Index > SVG Tutorials & Specs

SVGMatrix

Properties
float
a
The a component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
float
b
The b component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
float
c
The c component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
float
d
The d component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
float
e
The e component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
float
f
The f component of the matrix. Exceptions on settingDOMException, code NO_MODIFICATION_ALLOWED_ERR Raised on an attempt to change the value of a read only attribute.
Operations
SVGMatrix
flipX()
Post-multiplies the transformation [-1 0 0 1 0 0] and returns the resulting matrix. Returns The resulting matrix.
SVGMatrix
flipY()
Post-multiplies the transformation [1 0 0 -1 0 0] and returns the resulting matrix. Returns The resulting matrix.
SVGMatrix
inverse()
Returns the inverse matrix. Returns The inverse matrix. ExceptionsSVGException, code SVG_MATRIX_NOT_INVERTABLE Raised if this matrix is not invertable.
SVGMatrix
multiply(SVGMatrix secondMatrix)
Performs matrix multiplication. This matrix is post-multiplied by another matrix, returning the resulting new matrix. ParametersSVGMatrix secondMatrix The matrix which is post-multiplied to this matrix. Returns The resulting matrix.
SVGMatrix
rotate(float angle)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix. Parametersfloat angle Rotation angle. Returns The resulting matrix.
SVGMatrix
rotateFromVector(float x, float y)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix. The rotation angle is determined by taking (+/-) atan(y/x). The direction of the vector (x, y) determines whether the positive or negative angle value is used.
SVGMatrix
scale(float scaleFactor)
Post-multiplies a uniform scale transformation on the current matrix and returns the resulting matrix. Parametersfloat scaleFactor Scale factor in both X and Y. Returns The resulting matrix.
SVGMatrix
scaleNonUniform(float scaleFactorX, float scaleFactorY)
Post-multiplies a non-uniform scale transformation on the current matrix and returns the resulting matrix. Parametersfloat scaleFactorX Scale factor in X. float scaleFactorY Scale factor in Y. Returns The resulting matrix.
SVGMatrix
skewX(float angle)
Post-multiplies a skewX transformation on the current matrix and returns the resulting matrix. Parametersfloat angle Skew angle. Returns The resulting matrix.
SVGMatrix
skewY(float angle)
Post-multiplies a skewY transformation on the current matrix and returns the resulting matrix. Parametersfloat angle Skew angle. Returns The resulting matrix.
SVGMatrix
translate(float x, float y)
Post-multiplies a translation transformation on the current matrix and returns the resulting matrix. Parametersfloat x The distance to translate along the x-axis. float y The distance to translate along the y-axis. Returns The resulting matrix.
Referenced by
CanvasPatternsetTransform(...)
CanvasRenderingContext2DcurrentTransform
Path2DaddText(...)
SVGLocatablegetTransformToElement(...)
SVGPointmatrixTransform(...)
SVGSVGElementcreateSVGTransformFromMatrix(...)
SVGTransformsetMatrix(...)
SVGTransformListcreateSVGTransformFromMatrix(...)